import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    components:{
      content:() => import(/* webpackChunkName: "about" */ '../views/Home.vue')
    } 
  },
  {
    path: '/article',
    name: 'article',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    components:{
      content:() => import(/* webpackChunkName: "about" */ '../views/article.vue'),
      header: () => import('../components/nav.vue'),
      slider:() => import('../components/slider.vue'),
    } 
  },
  {
    path: '/articleDetail',
    name: 'articleDetail',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    components:{
      content:() => import(/* webpackChunkName: "about" */ '../views/articleDetail.vue'),
      header: () => import('../components/nav.vue'),
      slider:() => import('../components/slider.vue'),
    } 
  },
  {
    path: '/archive',
    name: 'archive',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    components:{
      content:() => import(/* webpackChunkName: "about" */ '../views/archive.vue'),
      header: () => import('../components/nav.vue'),
      slider:() => import('../components/slider.vue'),
    } 
  },
  {
    path: '/project',
    name: 'project',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    components:{
      content:() => import(/* webpackChunkName: "about" */ '../views/project.vue'),
      header: () => import('../components/nav.vue'),
      slider:() => import('../components/slider.vue'),
    } 
  },
  {
    path: '/timeline',
    name: 'timeline',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    components:{
      content:() => import(/* webpackChunkName: "about" */ '../views/timeline.vue'),
      header: () => import('../components/nav.vue'),
      slider:() => import('../components/slider.vue'),
    } 
  },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    components:{
      content:() => import(/* webpackChunkName: "about" */ '../views/about.vue'),
      header: () => import('../components/nav.vue'),
      slider:() => import('../components/slider.vue')
    } 
  },
  {
    path: '/message',
    name: 'message',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    components:{
      content:() => import(/* webpackChunkName: "about" */ '../views/message.vue'),
      header: () => import('../components/nav.vue'),
      slider:() => import('../components/slider.vue'),
    } 
  }
]

const router = new VueRouter({
  routes
})

export default router
